---
layout: "default"
title: "CommandLine"
description: "Swift documentation for 'CommandLine'"
root: "/v5.1"
keywords: ""
---

<div class="intro-declaration"><code class="language-swift">enum CommandLine</code></div><p>Command-line arguments for the current process.</p>
<div class="discussion comment"></div><h3>Type Variables</h3><div id="argc-212be369d46788be295dbb6516442fee" class="declaration"><a class="toggle-link" href="#comment-argc-212be369d46788be295dbb6516442fee">var argc</a> <span class="required">Required</span><div class="comment collapse in" id="comment-argc-212be369d46788be295dbb6516442fee"><p>Access to the raw argc value from C.</p>
<h4>Declaration</h4><code class="language-swift">var argc: Int32</code></div></div><div id="arguments-dbc11caa5bda99f77e6fb4dabd882e7d" class="declaration"><a class="toggle-link" href="#comment-arguments-dbc11caa5bda99f77e6fb4dabd882e7d">var arguments</a> <span class="required">Required</span><div class="comment collapse in" id="comment-arguments-dbc11caa5bda99f77e6fb4dabd882e7d"><h4>Declaration</h4><code class="language-swift">var arguments: [String]</code></div></div><div id="unsafeArgv-b86445266bc55e0b67045a7080f59454" class="declaration"><a class="toggle-link" href="#comment-unsafeArgv-b86445266bc55e0b67045a7080f59454">var unsafeArgv</a> <span class="required">Required</span><div class="comment collapse in" id="comment-unsafeArgv-b86445266bc55e0b67045a7080f59454"><p>Access to the raw argv value from C. Accessing the argument vector
through this pointer is unsafe.</p>
<h4>Declaration</h4><code class="language-swift">var unsafeArgv: UnsafeMutablePointer&lt;UnsafeMutablePointer&lt;Int8>?></code></div></div>